export namespace config {
	
	export class AppParams {
	    FirstPage: string;
	    LogName: string;
	
	    static createFrom(source: any = {}) {
	        return new AppParams(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.FirstPage = source["FirstPage"];
	        this.LogName = source["LogName"];
	    }
	}

}

export namespace device {
	
	export class DevFrontendConfig {
	    FieldName: string;
	    Label: string;
	    Type: string;
	    Required: boolean;
	    Min: number;
	    Max: number;
	    Options: string[];
	    Filters: string;
	    Unit: string;
	    SubConfigs: DevFrontendConfig[];
	
	    static createFrom(source: any = {}) {
	        return new DevFrontendConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.FieldName = source["FieldName"];
	        this.Label = source["Label"];
	        this.Type = source["Type"];
	        this.Required = source["Required"];
	        this.Min = source["Min"];
	        this.Max = source["Max"];
	        this.Options = source["Options"];
	        this.Filters = source["Filters"];
	        this.Unit = source["Unit"];
	        this.SubConfigs = this.convertValues(source["SubConfigs"], DevFrontendConfig);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class CPUConfig {
	    Name: string;
	    Id: number;
	    TypeName: string;
	    Type: number;
	    Self: any;
	    IsOptional: boolean;
	    Enable: boolean;
	    InputPins: pins.PinDef[];
	    OutputPins: pins.PinDef[];
	    PinMaps: pins.PinMap[];
	    FrontendConfig: DevFrontendConfig[];
	    VerilatorConfig?: fpga.VerilatorConfig;
	    LibPath: string;
	
	    static createFrom(source: any = {}) {
	        return new CPUConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.Id = source["Id"];
	        this.TypeName = source["TypeName"];
	        this.Type = source["Type"];
	        this.Self = source["Self"];
	        this.IsOptional = source["IsOptional"];
	        this.Enable = source["Enable"];
	        this.InputPins = this.convertValues(source["InputPins"], pins.PinDef);
	        this.OutputPins = this.convertValues(source["OutputPins"], pins.PinDef);
	        this.PinMaps = this.convertValues(source["PinMaps"], pins.PinMap);
	        this.FrontendConfig = this.convertValues(source["FrontendConfig"], DevFrontendConfig);
	        this.VerilatorConfig = this.convertValues(source["VerilatorConfig"], fpga.VerilatorConfig);
	        this.LibPath = source["LibPath"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class FlashConfig {
	    Name: string;
	    Id: number;
	    TypeName: string;
	    Type: number;
	    Self: any;
	    IsOptional: boolean;
	    Enable: boolean;
	    InputPins: pins.PinDef[];
	    OutputPins: pins.PinDef[];
	    PinMaps: pins.PinMap[];
	    FrontendConfig: DevFrontendConfig[];
	    Size: number;
	    FilePath: string;
	
	    static createFrom(source: any = {}) {
	        return new FlashConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.Id = source["Id"];
	        this.TypeName = source["TypeName"];
	        this.Type = source["Type"];
	        this.Self = source["Self"];
	        this.IsOptional = source["IsOptional"];
	        this.Enable = source["Enable"];
	        this.InputPins = this.convertValues(source["InputPins"], pins.PinDef);
	        this.OutputPins = this.convertValues(source["OutputPins"], pins.PinDef);
	        this.PinMaps = this.convertValues(source["PinMaps"], pins.PinMap);
	        this.FrontendConfig = this.convertValues(source["FrontendConfig"], DevFrontendConfig);
	        this.Size = source["Size"];
	        this.FilePath = source["FilePath"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class LedsConfig {
	    Name: string;
	    Id: number;
	    TypeName: string;
	    Type: number;
	    Self: any;
	    IsOptional: boolean;
	    Enable: boolean;
	    InputPins: pins.PinDef[];
	    OutputPins: pins.PinDef[];
	    PinMaps: pins.PinMap[];
	    FrontendConfig: DevFrontendConfig[];
	    LedNumbers: number;
	    Color: string;
	    LighingMode: string;
	
	    static createFrom(source: any = {}) {
	        return new LedsConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.Id = source["Id"];
	        this.TypeName = source["TypeName"];
	        this.Type = source["Type"];
	        this.Self = source["Self"];
	        this.IsOptional = source["IsOptional"];
	        this.Enable = source["Enable"];
	        this.InputPins = this.convertValues(source["InputPins"], pins.PinDef);
	        this.OutputPins = this.convertValues(source["OutputPins"], pins.PinDef);
	        this.PinMaps = this.convertValues(source["PinMaps"], pins.PinMap);
	        this.FrontendConfig = this.convertValues(source["FrontendConfig"], DevFrontendConfig);
	        this.LedNumbers = source["LedNumbers"];
	        this.Color = source["Color"];
	        this.LighingMode = source["LighingMode"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class NixieTubeConfig {
	    Name: string;
	    Id: number;
	    TypeName: string;
	    Type: number;
	    Self: any;
	    IsOptional: boolean;
	    Enable: boolean;
	    InputPins: pins.PinDef[];
	    OutputPins: pins.PinDef[];
	    PinMaps: pins.PinMap[];
	    FrontendConfig: DevFrontendConfig[];
	    IICConfig?: protocol.IICConfig;
	
	    static createFrom(source: any = {}) {
	        return new NixieTubeConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.Id = source["Id"];
	        this.TypeName = source["TypeName"];
	        this.Type = source["Type"];
	        this.Self = source["Self"];
	        this.IsOptional = source["IsOptional"];
	        this.Enable = source["Enable"];
	        this.InputPins = this.convertValues(source["InputPins"], pins.PinDef);
	        this.OutputPins = this.convertValues(source["OutputPins"], pins.PinDef);
	        this.PinMaps = this.convertValues(source["PinMaps"], pins.PinMap);
	        this.FrontendConfig = this.convertValues(source["FrontendConfig"], DevFrontendConfig);
	        this.IICConfig = this.convertValues(source["IICConfig"], protocol.IICConfig);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class RamConfig {
	    Name: string;
	    Id: number;
	    TypeName: string;
	    Type: number;
	    Self: any;
	    IsOptional: boolean;
	    Enable: boolean;
	    InputPins: pins.PinDef[];
	    OutputPins: pins.PinDef[];
	    PinMaps: pins.PinMap[];
	    FrontendConfig: DevFrontendConfig[];
	
	    static createFrom(source: any = {}) {
	        return new RamConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.Id = source["Id"];
	        this.TypeName = source["TypeName"];
	        this.Type = source["Type"];
	        this.Self = source["Self"];
	        this.IsOptional = source["IsOptional"];
	        this.Enable = source["Enable"];
	        this.InputPins = this.convertValues(source["InputPins"], pins.PinDef);
	        this.OutputPins = this.convertValues(source["OutputPins"], pins.PinDef);
	        this.PinMaps = this.convertValues(source["PinMaps"], pins.PinMap);
	        this.FrontendConfig = this.convertValues(source["FrontendConfig"], DevFrontendConfig);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class RealTimerConfig {
	    Name: string;
	    Id: number;
	    TypeName: string;
	    Type: number;
	    Self: any;
	    IsOptional: boolean;
	    Enable: boolean;
	    InputPins: pins.PinDef[];
	    OutputPins: pins.PinDef[];
	    PinMaps: pins.PinMap[];
	    FrontendConfig: DevFrontendConfig[];
	    TimerClockFrequency: number;
	
	    static createFrom(source: any = {}) {
	        return new RealTimerConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.Id = source["Id"];
	        this.TypeName = source["TypeName"];
	        this.Type = source["Type"];
	        this.Self = source["Self"];
	        this.IsOptional = source["IsOptional"];
	        this.Enable = source["Enable"];
	        this.InputPins = this.convertValues(source["InputPins"], pins.PinDef);
	        this.OutputPins = this.convertValues(source["OutputPins"], pins.PinDef);
	        this.PinMaps = this.convertValues(source["PinMaps"], pins.PinMap);
	        this.FrontendConfig = this.convertValues(source["FrontendConfig"], DevFrontendConfig);
	        this.TimerClockFrequency = source["TimerClockFrequency"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class SocGlobalConfig {
	    Name: string;
	    Id: number;
	    TypeName: string;
	    Type: number;
	    Self: any;
	    IsOptional: boolean;
	    Enable: boolean;
	    InputPins: pins.PinDef[];
	    OutputPins: pins.PinDef[];
	    PinMaps: pins.PinMap[];
	    FrontendConfig: DevFrontendConfig[];
	    ClockFrequency: number;
	    ResetRemainingClockTimes: number;
	
	    static createFrom(source: any = {}) {
	        return new SocGlobalConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.Id = source["Id"];
	        this.TypeName = source["TypeName"];
	        this.Type = source["Type"];
	        this.Self = source["Self"];
	        this.IsOptional = source["IsOptional"];
	        this.Enable = source["Enable"];
	        this.InputPins = this.convertValues(source["InputPins"], pins.PinDef);
	        this.OutputPins = this.convertValues(source["OutputPins"], pins.PinDef);
	        this.PinMaps = this.convertValues(source["PinMaps"], pins.PinMap);
	        this.FrontendConfig = this.convertValues(source["FrontendConfig"], DevFrontendConfig);
	        this.ClockFrequency = source["ClockFrequency"];
	        this.ResetRemainingClockTimes = source["ResetRemainingClockTimes"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class SwitchsConfig {
	    Name: string;
	    Id: number;
	    TypeName: string;
	    Type: number;
	    Self: any;
	    IsOptional: boolean;
	    Enable: boolean;
	    InputPins: pins.PinDef[];
	    OutputPins: pins.PinDef[];
	    PinMaps: pins.PinMap[];
	    FrontendConfig: DevFrontendConfig[];
	    SwitchNumbers: number;
	
	    static createFrom(source: any = {}) {
	        return new SwitchsConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.Id = source["Id"];
	        this.TypeName = source["TypeName"];
	        this.Type = source["Type"];
	        this.Self = source["Self"];
	        this.IsOptional = source["IsOptional"];
	        this.Enable = source["Enable"];
	        this.InputPins = this.convertValues(source["InputPins"], pins.PinDef);
	        this.OutputPins = this.convertValues(source["OutputPins"], pins.PinDef);
	        this.PinMaps = this.convertValues(source["PinMaps"], pins.PinMap);
	        this.FrontendConfig = this.convertValues(source["FrontendConfig"], DevFrontendConfig);
	        this.SwitchNumbers = source["SwitchNumbers"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class UartDisplayConfig {
	    Name: string;
	    Id: number;
	    TypeName: string;
	    Type: number;
	    Self: any;
	    IsOptional: boolean;
	    Enable: boolean;
	    InputPins: pins.PinDef[];
	    OutputPins: pins.PinDef[];
	    PinMaps: pins.PinMap[];
	    FrontendConfig: DevFrontendConfig[];
	    UartConfig?: protocol.UARTConfig;
	    ShowTerminal: boolean;
	
	    static createFrom(source: any = {}) {
	        return new UartDisplayConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.Id = source["Id"];
	        this.TypeName = source["TypeName"];
	        this.Type = source["Type"];
	        this.Self = source["Self"];
	        this.IsOptional = source["IsOptional"];
	        this.Enable = source["Enable"];
	        this.InputPins = this.convertValues(source["InputPins"], pins.PinDef);
	        this.OutputPins = this.convertValues(source["OutputPins"], pins.PinDef);
	        this.PinMaps = this.convertValues(source["PinMaps"], pins.PinMap);
	        this.FrontendConfig = this.convertValues(source["FrontendConfig"], DevFrontendConfig);
	        this.UartConfig = this.convertValues(source["UartConfig"], protocol.UARTConfig);
	        this.ShowTerminal = source["ShowTerminal"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}

}

export namespace fpga {
	
	export class SynthesisResult {
	    LibPath: string;
	    InputPins: pins.PinDef[];
	    OutputPins: pins.PinDef[];
	
	    static createFrom(source: any = {}) {
	        return new SynthesisResult(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.LibPath = source["LibPath"];
	        this.InputPins = this.convertValues(source["InputPins"], pins.PinDef);
	        this.OutputPins = this.convertValues(source["OutputPins"], pins.PinDef);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class Signal {
	    Direction: string;
	    Width: string;
	    VarName: string;
	    BitSize: number;
	    Type: string;
	    IsArray: boolean;
	
	    static createFrom(source: any = {}) {
	        return new Signal(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Direction = source["Direction"];
	        this.Width = source["Width"];
	        this.VarName = source["VarName"];
	        this.BitSize = source["BitSize"];
	        this.Type = source["Type"];
	        this.IsArray = source["IsArray"];
	    }
	}
	export class VerilatorConfig {
	    VerilatorModuleFilePath: string;
	    VerilatorTopModule: string;
	    VerilogModulePaths: string[];
	    VerilatorPath: string;
	    VerilatorIncludePath: string;
	    VerilatorCommand: string;
	    VerilatorTrace: boolean;
	    VerilatorTraceFile: string;
	    Inputs: Signal[];
	    Outputs: Signal[];
	
	    static createFrom(source: any = {}) {
	        return new VerilatorConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.VerilatorModuleFilePath = source["VerilatorModuleFilePath"];
	        this.VerilatorTopModule = source["VerilatorTopModule"];
	        this.VerilogModulePaths = source["VerilogModulePaths"];
	        this.VerilatorPath = source["VerilatorPath"];
	        this.VerilatorIncludePath = source["VerilatorIncludePath"];
	        this.VerilatorCommand = source["VerilatorCommand"];
	        this.VerilatorTrace = source["VerilatorTrace"];
	        this.VerilatorTraceFile = source["VerilatorTraceFile"];
	        this.Inputs = this.convertValues(source["Inputs"], Signal);
	        this.Outputs = this.convertValues(source["Outputs"], Signal);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}

}

export namespace frontend {
	
	export class FileFilter {
	    DisplayName: string;
	    Pattern: string;
	
	    static createFrom(source: any = {}) {
	        return new FileFilter(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.DisplayName = source["DisplayName"];
	        this.Pattern = source["Pattern"];
	    }
	}
	export class OpenDialogOptions {
	    DefaultDirectory: string;
	    DefaultFilename: string;
	    Title: string;
	    Filters: FileFilter[];
	    ShowHiddenFiles: boolean;
	    CanCreateDirectories: boolean;
	    ResolvesAliases: boolean;
	    TreatPackagesAsDirectories: boolean;
	
	    static createFrom(source: any = {}) {
	        return new OpenDialogOptions(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.DefaultDirectory = source["DefaultDirectory"];
	        this.DefaultFilename = source["DefaultFilename"];
	        this.Title = source["Title"];
	        this.Filters = this.convertValues(source["Filters"], FileFilter);
	        this.ShowHiddenFiles = source["ShowHiddenFiles"];
	        this.CanCreateDirectories = source["CanCreateDirectories"];
	        this.ResolvesAliases = source["ResolvesAliases"];
	        this.TreatPackagesAsDirectories = source["TreatPackagesAsDirectories"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class SaveDialogOptions {
	    DefaultDirectory: string;
	    DefaultFilename: string;
	    Title: string;
	    Filters: FileFilter[];
	    ShowHiddenFiles: boolean;
	    CanCreateDirectories: boolean;
	    TreatPackagesAsDirectories: boolean;
	
	    static createFrom(source: any = {}) {
	        return new SaveDialogOptions(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.DefaultDirectory = source["DefaultDirectory"];
	        this.DefaultFilename = source["DefaultFilename"];
	        this.Title = source["Title"];
	        this.Filters = this.convertValues(source["Filters"], FileFilter);
	        this.ShowHiddenFiles = source["ShowHiddenFiles"];
	        this.CanCreateDirectories = source["CanCreateDirectories"];
	        this.TreatPackagesAsDirectories = source["TreatPackagesAsDirectories"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}

}

export namespace pins {
	
	export class PinBitPair {
	    InputBitStart: number;
	    InputBitEnd: number;
	    OutputBitStart: number;
	    OutputBitEnd: number;
	
	    static createFrom(source: any = {}) {
	        return new PinBitPair(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.InputBitStart = source["InputBitStart"];
	        this.InputBitEnd = source["InputBitEnd"];
	        this.OutputBitStart = source["OutputBitStart"];
	        this.OutputBitEnd = source["OutputBitEnd"];
	    }
	}
	export class PinDef {
	    Name: string;
	    BitSize: number;
	    Direction: number;
	
	    static createFrom(source: any = {}) {
	        return new PinDef(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.BitSize = source["BitSize"];
	        this.Direction = source["Direction"];
	    }
	}
	export class PinMap {
	    InputPinName: string;
	    OutputPinName: string;
	    InputDevId: number;
	    OutputDevId: number;
	    PinBitPair?: PinBitPair;
	
	    static createFrom(source: any = {}) {
	        return new PinMap(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.InputPinName = source["InputPinName"];
	        this.OutputPinName = source["OutputPinName"];
	        this.InputDevId = source["InputDevId"];
	        this.OutputDevId = source["OutputDevId"];
	        this.PinBitPair = this.convertValues(source["PinBitPair"], PinBitPair);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}

}

export namespace protocol {
	
	export class IICConfig {
	    DevAddr: number;
	
	    static createFrom(source: any = {}) {
	        return new IICConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.DevAddr = source["DevAddr"];
	    }
	}
	export class UARTConfig {
	    Name: string;
	    BaudRate: number;
	    DataBits: number;
	    StopBits: number;
	    Parity: string;
	    UseGlobalClock: boolean;
	
	    static createFrom(source: any = {}) {
	        return new UARTConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.BaudRate = source["BaudRate"];
	        this.DataBits = source["DataBits"];
	        this.StopBits = source["StopBits"];
	        this.Parity = source["Parity"];
	        this.UseGlobalClock = source["UseGlobalClock"];
	    }
	}

}

export namespace soc {
	
	export class SocConfig {
	    Name: string;
	    PinMaps: pins.PinMap[];
	    Global?: device.SocGlobalConfig;
	    CPU?: device.CPUConfig;
	    RealTimer?: device.RealTimerConfig;
	    Ram?: device.RamConfig;
	    Flash?: device.FlashConfig;
	    UartDiaply?: device.UartDisplayConfig;
	    Leds?: device.LedsConfig;
	    Switchs?: device.SwitchsConfig;
	    NixieTube?: device.NixieTubeConfig;
	
	    static createFrom(source: any = {}) {
	        return new SocConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Name = source["Name"];
	        this.PinMaps = this.convertValues(source["PinMaps"], pins.PinMap);
	        this.Global = this.convertValues(source["Global"], device.SocGlobalConfig);
	        this.CPU = this.convertValues(source["CPU"], device.CPUConfig);
	        this.RealTimer = this.convertValues(source["RealTimer"], device.RealTimerConfig);
	        this.Ram = this.convertValues(source["Ram"], device.RamConfig);
	        this.Flash = this.convertValues(source["Flash"], device.FlashConfig);
	        this.UartDiaply = this.convertValues(source["UartDiaply"], device.UartDisplayConfig);
	        this.Leds = this.convertValues(source["Leds"], device.LedsConfig);
	        this.Switchs = this.convertValues(source["Switchs"], device.SwitchsConfig);
	        this.NixieTube = this.convertValues(source["NixieTube"], device.NixieTubeConfig);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}

}

